function sp_onmounseover(str) {
	str.style.color = "red";
	str.style.cursor = "pointer";
}
function sp_onmounseout(str) {
	str.style.color = "white";
}


$(document).ready(function() {
	
	$("#btnJoin").click(function() {
		location.href='${path}/member/join.jsp';
	});

	$("#btnLogin").click(function() {
		location.href = "<%=context%>/member/login.jsp";
	});

	$("#btnLogout").click(function() {
		$("#logOutForm").attr("action", "logout.mb");
		$("#logOutForm").submit();
	});
	// 관리자 메뉴 페이지
	$("#btnAdmin").click(function() {
		location.href='${path}/admin/admin.jsp';
	});
	// 마이페이지
	$("#btnMyinfo").click(function() {
		location.href='${path}/member/memberDetail.do?userid=${sessionScope.userid}';
	});
	
	/* ################ */

	// 메뉴 이동
	$("#menu_recipe").click(function() {
		location.href= "${path}/recipe/recipe_list.do";
	});
	$("#menu_class").click(function() {	
		location.href = "${path}/class1/class1_list.do";
	});
	$("#menu_freeboard").click(function() {
		location.href= "${path}/board/board_list.do";
	});
	$("#menu_ranking").click(function() {
		location.href= "${path}/ranking/ranking.do";
	});

	
	/* ################ */
	
	$("#menu_recipe").mouseover(function(){
		if($("#TypeMenu").css("display") == "none"){
			$('#TypeMenu').fadeTo('slow', 0.1, function()
			{
				$("#TypeMenu").show();
			}).fadeTo('slow', 1);
		}
	});
	
	$("#menu_recipe_close").click(function(){
		if($("#TypeMenu").css("display") == "block"){
			$("#TypeMenu").hide();
		}
	});


});